using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace HamcoWcs.Entitys.MonitorInfos
{
    public class MonitorInfoConfig : IEntityTypeConfiguration<MonitorInfo>
    {
        public void Configure(EntityTypeBuilder<MonitorInfo> builder)
        {
            builder.HasComment("监控信息表");
            builder.Property(x => x.Type).IsRequired().HasComment("监控类型");
            builder.Property(x => x.Name).IsRequired().HasMaxLength(30).HasComment("设备名");
            builder.Property(x => x.StartPoint).IsRequired().HasComment("偏移量");
            builder.Property(x => x.Length).IsRequired().HasComment("长度");
            builder.Property(x => x.PlcName).IsRequired().HasMaxLength(30).HasComment("PLC名");
        }
    }
}